﻿using System;
using XSTDZ.ERP.Application.DataContracts;
using System.Collections.Generic;

namespace XSTDZ.ERP.Application
{
    /// <summary>
    /// 客户 服务类
    /// </summary>
    public interface IClientService
    {
        void AddClient(ClientInfoDto clientInfoDto);
        void AddClient(ClientLinkDto clientLinkDto);
        void AddClient(IList<ClientLinkDto> clientLinkDtos);//

        void UpdateClient(ClientInfoDto clientInfoDto);
        void UpdateClient(ClientLinkDto clientLinkDto);
        void UpdateClient(IList<ClientLinkDto> clientLinkDtos);//
        ClientInfoDto GetClientInfo(Guid clientId);

        IList<ClientInfoDto> GetClientInfos(int pageIndex, int pageSize, bool containDelete);

        IList<ClientLinkDto> GetClientLinks(int pageIndex, int pageSize, bool containDelete);
        IList<ClientLinkDto> GetClientLinks(Guid clientId);

        ClientLinkDto GetClientLink(Guid clientId);


        void DeleteClient(Guid clientId);
        void DeleteClient(IList<Guid> clientLinkIds);
       

        /// <summary>
        /// 仅获取一个层级数据
        /// </summary>
        /// <param name="parentId">父级ID，若无ID，则获取省级数据</param>
        /// <returns></returns>
        IList<AddressAreaDto> GetAddressAreas(int parentId);
        /// <summary>
        /// 仅获取所有数据
        /// </summary>
        /// <param name="parentId"></param>
        /// <returns></returns>
        IList<AddressAreaDto> GetAddressAllAreas();

    }
}
